import Layout from '@/layout/index.vue'
import { RouteRecordRaw } from 'vue-router'

const systemRoute: RouteRecordRaw = {
  path: '/',
  name: 'system',
  component: Layout,
  redirect: '/dashboard',
  children: [
    {
      path: '/dashboard',
      name: 'dashboard',
      component: () => import('@/views/dashboard/dashboard.vue'),
      meta: {
        title: '工作台',
        affix: true,
        power: 'A',
      },
    },
    {
      path: '/userManage',
      name: 'userManage',
      component: () => import('@/views/userManage/userManage.vue'),
      meta: {
        title: '用户管理',
        power: 'B',
      },
    },
    {
      path: '/videoManage',
      name: 'videoManage',
      redirect: '/list',
      meta: {
        title: '视频管理',
      },
      children: [
        {
          path: '/list',
          name: 'videoList',
          component: () => import('@/views/videoList/videoList.vue'),
          meta: {
            title: '视频列表',
            power: 'C',
          },
        },
        {
          path: '/videoE',
          name: 'videoE',
          component: () => import('@/views/videoManage/videoManage.vue'),
          meta: {
            title: '视频审查',
            icon: 'menu',
            power: 'D',
          },
        },
      ],
    },
  ],
}

export default systemRoute
